function [Mom, datasim]=csMoments(bParams,oParams,setts,param,paramName)
% Wrapper for moments function used in the comparative statics analysis

% Variables:
% bParams,oParams,setts		see readme
% param			parameter value to be replaced
% paramName		name of the parameter


% Calculate moments
	if strcmp('pi', paramName)
		oParams2 = oParams;
		eval(['oParams2.',paramName,'=param;']);
		[Mom, datasim, ~, ~, ~, ~, ~, ~, ~] = moments(bParams,oParams2,setts);

% Update other parameters and calculate moments
	else
		bParams2 = bParams;
		eval(['bParams2.',paramName,'=param;']);
		[Mom, datasim, ~, ~, ~, ~, ~, ~, ~] = moments(bParams2,oParams,setts);
	end

end
